Synthesis of progressively-variant textures and application to arbitrary surfaces

ABSTRACT

Methods for synthesizing progressively-variant textures based on texton masks are provided. A first method creates a synthesized texture image guided by a sample texture, first texton mask corresponding to the sample texture and a second texton mask modified based on the first texton mask. A second method also creates a synthesized texture image guided by a first and second sample textures and corresponding first and second texton masks. A method for rendering a synthesized texture on an image of a three-dimensional object includes creating a synthesized texture on the object guided by a two-dimensional progressively-variant sample texture, a texton mask for the sample texture and a mesh of a plurality of vertices representing the object.

BACKGROUND OF THE INVENTION

The present invention relates to computer generated graphics. Inparticular, the present invention relates to the modeling and renderingof realistic graphics on a computer.

Computer graphics are used in many different applications includingcomputer games, movies and web pages. With the capability of morepowerful computers, realistic graphics are becoming more desired inorder to provide a more realistic experience to the computer user.

One particular area of focus has been in area of synthesized textures ontwo-dimensional and three-dimensional shapes. A texture is the visualsurface features of the object and can include scale, orientation, shapeand/or color of geometric elements of a pattern or pseudo-pattern on thesurface of the object. Much of the previous work on surface texturesynthesis concentrated on homogeneous textures. These textures arestationary in that they are characterized by stationary stochasticmodels. Homogeneous textures, however, only account for a limited classof real world textures. Many textures, including the fur patterns ofvarious animals such as the tiger or the leopard, cannot be described bystationary models. These patterns exhibit complex variations resultingfrom a biological growth process. Another example includes stonework ona building or other structure.

One way to create textures with local variations is through simulationof chemical or biological processes. These techniques have usedreaction-diffusion differential equations to model texture surfaces thatvary, for instance, by changing the diffusion rates on the targetsurfaces. Using such modeling techniques may limit the textures to whichthe process can be applied. In addition, the parameters, and thechanging of the parameters, may not be intuitive to many users.

Accordingly, a systematic method for modeling and/or rendering ofvariant textures would be would be very beneficial.

SUMMARY OF THE INVENTION

Methods for modeling of two-dimensional progressively-variant texturesand synthesis of the textures over surfaces are provided. Unlike ahomogeneous texture, a progressively variant texture can model localtexture variations, including the scale, orientation, color, and shapevariations of texture elements.

In a first method of modeling, herein referred to as feature-basedwarping, the method allows the user to control the shape variations oftexture elements, making it possible to capture complex texturevariations such as those seen in animal coat patterns. In another methodof modeling, herein referred to as feature-based blending, the methodcan create a smooth transition between two given homogeneous textures,with progressive changes of both shapes and colors of texture elements.Both techniques utilize texton masks to provide smooth transitions inthe feature elements of the textures.

For synthesizing textures over surfaces, the biggest challenge is thatthe synthesized texture elements tend to break apart as theyprogressively vary. To address this issue, a method is provided based ona texton mask, and more particularly, synthesizes the texton mask alongwith a target texture on a mesh representation of an object. Byleveraging the power of texton masks, the method can maintain theintegrity of the synthesized texture elements on the target surface.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an exemplary computing environment forpracticing the present invention.

FIG. 2A is an image of a texture.

FIG. 2B is an image of a texton mask for the texture of FIG. 2A.

FIG. 3 is a representation of a transfer function.

FIG. 4 is a representation of an orientation function.

FIG. 5 is a block diagram of a 2D progressively-variant texture modelingsystem.

FIG. 6 is pictorial representation of field distortion synthesis.

FIG. 7A is a flow chart of a method for field distortion synthesis.

FIG. 7B is a flow chart of a method for texton mask filtering.

FIG. 8 are images of warped textures and corresponding texton masks.

FIG. 9 is an image of a blended texture.

FIG. 10 are images of texton masks used as a basis to form the blendedtexture of FIG. 9.

FIG. 11 are images illustrating creation of a blended mask.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

Prior to discussing the present invention in greater detail, anembodiment of an illustrative environment in which the present inventioncan be used will be discussed. FIG. 1 illustrates an example of asuitable computing system environment 100 on which the invention may beimplemented. The computing system environment 100 is only one example ofa suitable computing environment and is not intended to suggest anylimitation as to the scope of use or functionality of the invention.Neither should the computing environment 100 be interpreted as havingany dependency or requirement relating to any one or combination ofcomponents illustrated in the exemplary operating environment 100.

The invention is operational with numerous other general purpose orspecial purpose computing system environments or configurations.Examples of well known computing systems, environments, and/orconfigurations that may be suitable for use with the invention include,but are not limited to, personal computers, server computers, hand-heldor laptop devices, multiprocessor systems, microprocessor-based systems,set top boxes, programmable consumer electronics, network PCs,minicomputers, mainframe computers, distributed computing environmentsthat include any of the above systems or devices, and the like.

The invention may be described in the general context ofcomputer-executable instructions, such as program modules, beingexecuted by a computer. Generally, program modules include routines,programs, objects, components, data structures, etc. that performparticular tasks or implement particular abstract data types. Theinvention may also be practiced in distributed computing environmentswhere tasks are performed by remote processing devices that are linkedthrough a communications network. In a distributed computingenvironment, program modules may be located in both local and remotecomputer storage media including memory storage devices. Tasks performedby the programs and modules are described below and with the aid offigures. Those skilled in the art can implement the description andfigures as processor executable instructions, which can be written onany form of a computer readable media.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a general-purpose computing device in the form of acomputer 110. Components of computer 110 may include, but are notlimited to, a processing unit 120, a system memory 130, and a system bus121 that couples various system components including the system memoryto the processing unit 120. The system bus 121 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Association (VESA) local bus, and Peripheral ComponentInterconnect (PCI) bus also known as Mezzanine bus.

Computer 110 typically includes a variety of computer readable media.Computer readable media can be any available media that can be accessedby computer 110 and includes both volatile and nonvolatile media,removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes both volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by computer 100.

Communication media typically embodies computer readable instructions,data structures, program modules or other data in a modulated datasignal such as a carrier wave or other transport mechanism and includesany information delivery media. The term “modulated data signal” means asignal that has one or more of its characteristics set or changed insuch a manner as to encode information in the signal. By way of example,and not limitation, communication media includes wired media such as awired network or direct-wired connection, and wireless media such asacoustic, FR, infrared and other wireless media. Combinations of any ofthe above should also be included within the scope of computer readablemedia.

The system memory 130 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 1 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

The computer 110 may also include other removable/non-rembvablevolatile/nonvolatile computer storage media. By way of example only,FIG. 1 illustrates a hard disk drive 141 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disk drive 155 that reads from or writes to a removable,nonvolatile optical disk 156 such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 141 is typically connectedto the system bus 121 through a non-removable memory interface such asinterface 140, and magnetic disk drive 151 and optical disk drive 155are typically connected to the system bus 121 by a removable memoryinterface, such as interface 150.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 1, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 110. In FIG. 1, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers here to illustrate that, ata minimum, they are different copies.

A user may enter commands and information into the computer 110 throughinput devices such as a keyboard 162, a microphone 163, and a pointingdevice 161, such as a mouse, trackball or touch pad. Other input devices(not shown) may include a joystick, game pad, satellite dish, scanner,or the like. These and other input devices are often connected to theprocessing unit 120 through a user input interface 160 that is coupledto the system bus, but may be connected by other interface and busstructures, such as a parallel port, game port or a universal serial bus(USB). A monitor 191 or other type of display device is also connectedto the system bus 121 via an interface, such as a video interface 190.In addition to the monitor, computers may also include other peripheraloutput devices such as speakers 197 and printer 196, which may beconnected through an output peripheral interface 190.

The computer 110 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer180. The remote computer 180 may be a personal computer, a hand-helddevice, a server, a router, a network PC, a peer device or other commonnetwork node, and typically includes many or all of the elementsdescribed above relative to the computer 110. The logical connectionsdepicted in FIG. 1 include a local area network (LAN) 171 and a widearea network (WAN) 173, but may also include other networks. Suchnetworking environments are commonplace in offices, enterprise-widecomputer networks, intranets and the Internet.

When used in a LAN networking environment, the computer 110 is connectedto the LAN 171 through a network interface or adapter 170. When used ina WAN networking environment, the computer 110 typically includes amodem 172 or other means for establishing communications over the WAN173, such as the Internet. The modem 172, which may be internal orexternal, may be connected to the system bus 121 via the user inputinterface 160, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 110, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 1 illustrates remoteapplication programs 185 as residing on remote computer 180. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

Overview

Aspects of the present invention relate to synthesizing a texture thatvaries over the surface when it is rendered. As discussed in thebackground section, many textures in nature include elements that varyin scale, orientation, color and/or shapes such as the spots present ona leopard's fur or stonework of a building. As used herein such texturesare called “progressively-variant” textures. Stated another way, atexture is progressively-variant if texture characteristics changesmoothly over the texture domain. However, at some level (e.g a smallportion such as each point) of the texture domain there should be aneighborhood over which the texture is stationary. One broad aspectrelates to generating or modeling a progressively-variant texture thatvaries in one or more of the above-mentioned characteristics, while infurther embodiments, convenient parameters can be varied by a user toadjust these characteristics. Another broad aspect, includes applicationof a progressively-variant to a simulate the texture on a selectedobject.

Many of the examples discussed below are directed to simulation ofnatural occurring textures such as an animal's fur coat. Nevertheless,aspects of the present invention are not intended to be limited to thisapplication and that synthesis and/or application of anyprogressively-variant texture can benefit from aspects of the presentinvention including representations of other life forms or non-lifeforms both realistic and imaginary.

Multi-Channel Texture Representation

Herein a progressively-variant texture is represented by multiplechannels, specifically, by a tuple (T, M, F, V) with a texture image Tand three user-specified control channels. The texton mask M is alabeling map that marks the prominent texture elements in T. At eachpixel p, the texton mask indicates which type of texture elements pbelongs to. The orientation field is a vector field defining a unitvector at each pixel of T, whereas the transition function is a functionF (e.g. continuous scalar function, although other function could beused) whose characteristic such as a gradient describes the rateand/direction of change in the texture T. FIG. 2A illustrates anexemplary a texture image 200, while texton mask 202 corresponding tothe element shapes in the texture image 200 is illustrated in FIG. 2B at202. FIG. 3 is a pictorial representation of a transition function (F)300, while FIG. 4 is a pictorial representation of an orientation field(V) 400.

FIG. 5 illustrates inputs for generating a a progressively-varianttexture in two dimensions (“2D”). A progressively-variant, twodimensional modeling module 500 receives a texture sample 502 commonly ahomogeneous sample either created or as an image from a real sample. Auser-specified inputs are indicated at 504 and typically include atexton mask M, a transition function F and an orientation field V. Thespecification of F and V can be similar to the familiar task ofspecifying vector fields for synthesizing (homogeneous) textures onsurfaces such as found in “Texture synthesis on surfaces” by Turk G.published in Proceedings of SIGGRAPH 2001 (August), 347-354.Specification of texton mask T can be based on a simple but effectivecolor thresholding method described below.

A progressively-variant 2D texture 506 is created by field distortionand/or feature-based, techniques. In general, the field distortionalgorithm or method generates a texture by scaling and rotating thelocal coordinate frame at each pixel according to the transitionfunction (F) and orientation field (V). Feature-based techniques use thetexton mask 202 to guide the synthesis of the target textures byproviding a rough sketch of the distribution and shapes of thesynthesized texture elements. Specifically, a feature-based warpingalgorithm or method first warps the texton mask and then uses that tosynthesize a new texture. A feature-based blending algorithm or method,if used, takes two homogeneous textures with corresponding texton masksas input and generates a blend texton mask and then a blend texture.

Field Distortion Synthesis

The field distortion algorithm or method implemented byprogressively-variant, two dimensional synthesis module 500 synthesizesa progressively-variant texture T_(o) from a homogeneous sample textureby controlling scale and orientation variations of the texture elementsin T_(o). For texture elements in T_(o) to change size and orientationsmoothly, a continuous transition function F_(o) and a continuousorientation field V_(o) of the size of T_(o) are desired. In oneembodiment, a user can specify scale and orientation vectors at a fewlocations (“keys”), where the modeling module 500 then interpolatesthese “key” scales and orientations to generate the entire F_(o) andV_(o) by using, for instance, radial basis functions. Such a techniqueis used in generating vector fields on surfaces.

FIG. 6 pictorially illustrates the synthesis process, while FIG. 7Aprovides a flow chart for the method of synthesis. Essentially the fielddistortion algorithm incorporates scale and orientation variationscontrolled by F_(o) and V_(o). The algorithm synthesizes T_(o)pixel-by-pixel. Referring to FIG. 7A, to synthesize a pixel (p) 602, atstep 702, the algorithm first scales and orients the target textureT_(o) to compute the pixel's 602 neighborhood N(p) 604. At step 704, allneighborhoods in sample texture similar to N(p) are found. At step 706,the neighborhood most similar is chosen, taking its center to be thenewly synthesized pixel 602. F_(o) and V_(o) control the target texturethrough the construction of the neighborhood N(p) 604. As illustrated inFIG. 6, the pixels in N(p) 604 are not of the same size as the pixels ofthe target texture T_(o), instead they are scaled by the scalard=F_(o)(p) and oriented according to the vector V_(o)(p) (hereinrepresented as θ), as illustrated by step 702. The pixels in N(p) 604are resampled from that of T_(o) at step 702. In one embodiment, thepixels in N(p) 604 are computed from the four nearest pixels in T_(o) bybilinear interpolation. This is a simple approximation that works wellfor a wide range of scales and orientations; however, other techniquescan be used. Ideally, the resampling should be weighted by the coverageof N(p) 's pixels in T_(o). However, computing pixel coverage is acostly operation and typically avoided whenever possible.

The synthesis order has a large effect on the synthesis quality. Anorder established as in “Texture synthesis on surfaces” by Turk G.published in Proceedings of SIGGRAPH 2001 (August), 347-354, which isincorporated herein by reference in its entirety, generates excellentresults. Nevertheless, it should be noted also that the self-similaritybased texture editing, such as described in “Feature-based imagemetamorphos is,” Computer Graphics (Proceedings of SIGGRAPH 92) 26, 2(July 2002), 35-42 by Brooks, S., and Dodgson, N., can be easily adaptedfor interactive editing of progressively-variant textures.

Feature-Based Synthesis

To apply feature-based techniques, the user must specify or access atexton mask 202 for a given texture 200. The texton mask 202 identifiesprominent features or texture elements of the texture 200. Texton maskconstruction may be regarded as an image segmentation problem. In theembodiment illustrated, a suitable user interface allows the user tomark prominent texture elements easily. It has been found that a textonmask indicating one or two types of the most prominent texture elementsis sufficient for modeling and synthesis of progressively-varianttextures.

In one embodiment, the user interface is based on color thresholding.For example, the user can pick one or two pixel colors of the texture200 and for each color a threshold for color differences is selected.The sample texture is then processed and partitioned accordingly, whichwhen rendered results in an image such as mask 202 having a small numberof colors. Similar techniques are well-known. This is a simple andeffective technique for textures in which meaningful patterns can bediscriminated by colors. It has been found texton masks produced by thistechnique work well for most textures, mainly for the reason that thefeature-based techniques and surface texture synthesis algorithmdescribed below have very low requirements for texton masks and are notsensitive to errors in texton masks. As appreciated by those skilled inthe art, more sophisticated segmentation methods can be used to generatebetter texton masks when necessary.

In addition to color thresholding, support can be provided formorphological operations such as dilation and erosion for refiningtexton masks.

Feature Based Warping and Blending

A progressively-variant texture can be formed by warping and/orblending. Referring first to warping, a texton mask M_(i) is used tomark the features or texture elements in the input texture T_(i) andthen editing or modification operations are performed on this mask,producing a new mask M_(o). The transition function F_(o) controls theparameters in the editing or modification operations to achieve a smoothprogressive variation of patterns in the mask M_(o). The system can thensynthesize a progressively-variant texture To using two texton masks,M_(i) and M_(o), and known texture T_(i).

The synthesis of the texture T_(o) can be formulated as an applicationof image analogies. Specifically, an analogous texture T_(o) can befound that relates to the new texton mask M_(o) the same way as originaltexture T_(i) relates to its texton mask M_(i). Referring to FIG. 7B, amethod for assigning pixel characteristics for the synthesized textureT_(o) includes, at step 720, for each pixel p in T_(o), neighborhoodincluding color N_(c)(p) and mask N_(m)(p) from T_(o) and M_(o) isconstructed. At step 722, finding all neighborhoods in original textureT_(i) and texton mask M_(i) similar to N_(c)(p) and N_(m)(p). At step724, the neighborhood most similar is chosen, assigning the color valueat its center to the pixel p.

Using the terminology of image analogies, T_(i) and T_(o) are filteredresults of the texton masks M_(i) and M_(o) respectively. As used hereinthe step of creating T_(o) from M_(i), M_(o), and T_(i) is referred toas texton mask filtering.

Texton mask filtering bears some resemblance to the texture-by-numberstechnique by Hertzann, A., Jacobs, C. E., Oliver, N., Curless, B., andSalesin, D. H. in “Image analogies.” Proceedings of SIGGRAPH 2001(August), 327-340. The latter technique synthesizes a non-homogeneoustexture consisting of patches of homogeneous textures from an inputnon-homogeneous texture that has been segmented into homogeneouspatches. The main difference is that texton mask filtering usesfine-grain partitions of the textures (down to the texture elementlevel).

A variety of editing operations can be applied to the original textonmask M_(i) to generate a desired target mask M_(o). When the textonmasks have few colors, morphological operations such as dilation,erosion, and their combinations can be easily applied. It should also benoted image warping techniques such as mesh warping, field warping, andwarping using radial basis functions can be applied. These techniquesoften require feature points and feature lines to be specified. SUZUKI,S., AND ABE, K. “Topological structural analysis of digital binaryimages by border following.” Computer Vision, Graphics, and ImageProcessing 30, 1, 32-46, 1985, which is incorporated herein byreference, can be used for this purpose. As shown in FIG. 2B, a textonmask often has isolated patterns repeating over the mask. The previouslymentioned technique by Suzuki and Abe can be used to extract theboundary contours of these patterns. For image warping, these contourscan be used as feature lines and the contour centers as feature points.

FIG. 8 shows an example of feature-based warping. Texture 800 and textonmask 802 correspond to a homogenous tiger skin texture, while texture804 and texton mask 806 are the result after warping where the textonmask 806 is warped by progressively shrinking the stripes horizontallybut not vertically.

A progressively-variant texture can also be formed by blending twotextures. This technique takes two homogeneous textures T₀ and T₁ asinput and generates a progressively-variant texture T_(b) that providesa smooth transition from T₀ to T₁ as shown in FIG. 9.

For purposes of simplicity of explanation, assume T₀, T₁, and T_(b) areall of the same size and are defined on the unit square [0,1]×[0,1].Also a simple linear transition function F_(b)(x, y)=x defined on[0,1]×[0,1] is used. In addition, referring to FIG. 10, binary textonmasks M₀ 1000 and M₁ 1002 for T₀ and T₁, respectively, are used.

Blending begins with the construction of M_(b). This can be done in afew different ways. A simple technique is the following. Ideally, it isdesired that M_(b)(x, y) to be like M₀ when x≈0 and like M₁ when x≈1. Toachieve this goal, 2D binary functions M₀ and M₁ are interpolated in 3Dand a diagonal 2D slice is taken, obtaining M(x, y)=xM₁(x, y)+(1−x)M₀(x,y). M(x, y) behaves like M₀ when x≈0 and like M₁ when x≈1. A smoothingoperation such as a Gaussian blur M(x, y) is used to smooth out thediscontinuity inherited from M₁ and M₂. Finally, the values of M(x, y)are converted using a user-selected threshold to realize the binary maskM_(b). FIG. 11 illustrates the construction of texton mask M_(b) used inthe middle portion of FIG. 9. Image 1100 illustrates M(x,y) Image 1102illustrates a Gaussian-blurred M(x,y) and image 1104 illustrates textonmask M_(b).

Having constructed the texton mask M_(b), the blend texture T_(b) can beconstructed. In particular, T_(b) can be obtained by color blending twomodified textures T′₀ and T′₁ according to the transition functionF_(b), where modified texture T′₀ can be synthesized from two textonmasks, M₀ and M_(b), and texture T₀ by using texton mask filteringdescribed above, and where modified texture T′₁ can be synthesized fromM₁ and M_(b), and texture T₁ in the same way. Because T′₀ and T′₁ sharethe same texton mask M_(b), features in T′₀ and T′₁ are aligned and thusthe color blending of T′₀ and T′₁ will not cause “ghosting”.

Surface Texture Synthesis

A 2D progressively-variant texture sample (T_(o), M_(o), F_(o), V_(o))is used for synthesis on a selected object. In general, the userspecifies a transition function F_(s) and orientation field V_(s) on atarget mesh of the selected object. On the mesh, the synthesis algorithmcontrols the scale and orientation variation of texture elements bymatching F_(s) and V_(s) with their 2D counterparts. The applicationalgorithm synthesizes a texton mask M_(s) in conjunction with the targettexture T_(s) and uses M_(s) to prevent the breaking of textureelements.

Thus, given a surface mesh of an object and a progressively-variant 2Dtexture T_(o) with transition function F_(o), orientation field V_(o),and texton mask Mo, a progressively-variant texture T_(s) can besynthesized on the mesh. As in the case of homogeneous texturesynthesis, the user needs to specify an orientation field V_(s) on themesh by providing the orientations at some key locations. Forprogressively-variant textures, the user may also need to specify atransition function F_(s) on the mesh in a similar fashion. From theuser-specified values, the system can interpolate the entire V_(s) andF_(s) using Gaussian radial basis functions, where the radius is thedistance over the mesh.

The synthesis algorithm or method is based on texton masks. In aprogressively variant texture synthesized without texton masks, textureelements tend to break apart as discussed in the background section. Thebreaking of texture elements is caused by the fact that the standardL2-norm is a poor perceptual measure for neighborhood similarity, whichis at the heart of all texture synthesis algorithms following anonparametric sampling approach. Ideally, a good perceptual measureshould account for the fact that the human visual system is mostsensitive to edges, corners, and other high-level features in images.The simple L2-norm cannot account for this fact and the associatedsynthesis process often smoothes out the edges in the output texture,leading to breaking and re-mixing of texture elements.

To prevent the breaking of texture elements, the synthesis algorithm ormethod synthesizes a texton mask M_(s) in conjunction with the textureT_(s). This algorithm is based on two ideas. First, texton masks areresistant to damage caused by deficiencies in the L2-norm. Specifically,non-parametric sampling can only generate pixel values that alreadyexist in the input texture and thus cannot smooth out edges when theinput texture has few colors, which is the case for texton masks.

The second concept in synthesis is to leverage the damage resistingproperty of texton masks. By synthesizing a texton mask on the targetsurface, the mask can be used to guide the texture synthesis process byencouraging it to pick, for each mesh vertex v, the color of a pixel pin the 2D texture sample such that v and p have the same texton maskvalue.

As indicated above, the synthesis method synthesizes the texton maskM_(s) along with the target texture T_(s) on the mesh. In short, foreach mesh vertex, after its neighborhood is flattened and resampled, atexton mask value for vertex v in the 2D texton mask M_(o) is determinedor searched. Then, both the resampled color and texton mask values areused to jointly search for the color value at vertex v.

A single-resolution and single-pass version of the synthesis method isas follows. A pass is made through the vertices of the mesh and a colorand a texton mask value is picked for every vertex. The orientationfield V_(s) is used to determine the processing order of mesh vertices.This technique can noticeably improve the synthesis quality.

At each vertex v, the color is obtained through the following steps.First, color and mask neighborhoods N_(c)(v) and N_(m)(v), respectively,are constructed in the tangent plane of the surface at v (i.e., for eachneighborhood the vertices are considered flattened). Within the tangentplane, N_(c)(v) and N_(m)(v) have the same orientation, which isdetermined by the surface orientation field value V_(s)(v). Theneighborhood N_(c)(v) contains color values resampled from that of thevertices near v. Likewise, the neighborhood N_(m)(v) holds texton maskvalues resampled from that of the vertices near v.

In the next step, all candidate pixels for vertex v in the 2D textureT_(o) are collected and put in the candidate pool C(v,e). To qualify forC(v,ε), a candidate pixel p must satisfy the condition|F _(o)(p)−F _(s)(ν)|<ε,  (1)where ε is a prescribed tolerance for mismatch in transition functionvalues. For all the examples discussed herein, ε=0.1 for transitionfunction values normalized to lie in the interval [0,1].

Two searches are then performed, one for texton mask value M_(s)(v) andthe other for vertex color T_(s)(v). For M_(s)(v), a pixel p isascertained in C(v,ε) such that the distance between the neighborhoodsN_(m)(v) and N_(m)(p) is the smallest, where N_(m)(p) is a neighborhoodof p in the 2D texton mask M_(o).

Searching for T_(s)(v) is slightly more complex. A pixel p in thecandidate pool C(v,ε) is desired such that the following sum of twodistancesdist(N_(c)(v),N_(c)(p))+dist(N_(m)(v),N_(m)(p))

is the smallest, where N_(c)(p) is a neighborhood of p in the 2D textureT_(o). The neighborhoods N_(c)(p) and N_(m)(p) have the sameorientation, which is determined by the 2D orientation field valueV_(o)(p). The pseudo-code of the method is as follows. For each vertex von surface   construct neighborhoods N_(c)(v) and N_(m)(v)   buildcandidate pool C(v,ε)   smallest_match = INFTY   For each pixel p =(a,b) in C(v,ε)     construct neighborhoods N_(m)(p)     New_match =dist(N_(m)(v),N_(m)(p))     If (new_match < smallest_match)      smallest_match = new_match       Mask_value = M_(o)(p)   M_(s)(v)= mask_value   Smallest_match = INFTY   For each pixel p=(a,b) in C(v,ε)    construct neighborhoods N_(c)(p) and        N_(m)(p)    new_match=dist(N_(c)(v),N_(c)(p))+        dist(N_(m)(v),N_(m)(p))    If (new_match < smallest_match)       Smallest_match=new_(—) match      color = T_(o)(p)   T_(s)(v) = color

In a further embodiment, a two-pass multi-resolution synthesis improvesthe synthesis quality. In addition, a refinement pass with a smallneighborhood size can be performed. This refinement pass is very fastand noticeably improves synthesis results.

Neighborhood Construction

In one embodiment, a larger (i.e., having more pixels) neighborhoodsN_(m)(v) and N_(m)(p) is used when searching for the texton mask valueat v. Whereas, when searching for the color value at v, a smallerneighborhood size for both the color neighborhoods N_(c)(v) and N_(c)(p)and the texton mask neighborhoods N_(m)(v) and N_(m)(p) can be used. Therationale behind this choice is that texton masks determine the layoutof texture elements whereas the synthesis of pixel colors is simply astep to fill in the details.

Another technical issue is the local adaptation of the size of theneighborhood N_(c)(p). One would expect that as texture elements changesizes, the neighborhood used to capture them should also change. This isindeed the case and N_(c)(p) should really be N_(c)(p,s) wheres=F_(o)(p) is the scale at p. Let N_(c)(p,s_(min)) be the smallestneighborhood and N_(c)(p, s_(max)) be the largest. The size ofN_(c)(p,s) can be determined by linearly interpolating between that ofNc(p, s_(min)) and N_(c)(p, s_(max)) and rounding the result up to thenearest integer. The same local adaptation technique applies toneighborhoods N_(m)(p), N_(c)(v) and N_(m)(v).

Matching Transition Functions

The synthesis algorithm requires matching the transition function valueswhen searching for the color and texton mask value of a vertex v. Thisis met by confining the search to the candidate pool C(v,ε). Thisapproach is very different from most existing algorithms forsynthesizing stationary textures on surfaces, as these algorithms simplysearch all pixels of the 2D sample texture T_(o). An advantage ofsearching all pixels is that hierarchical data techniques such askd-trees and tree-structured vector quantization (TSVQ) can beprecomputed and used to accelerate the search. Unfortunately, the pixelp found by the search may not satisfy the condition in Equation (1),which is needed for progressively-variant textures.

In the synthesis method, the matching of transition function values isguaranteed since a qualified candidate p in C(v,ε) is required tosatisfy the condition in Equation (1). With C(v,ε) so constructed,kd-trees or TSVQ can not be used to accelerate the search because C(v,ε)changes from vertex to vertex, making pre-computation of kd-trees andTSVQ impossible. To address this problem, C(v,ε) is searched using ak-coherence technique proposed by Tong et al. in “Synthesis ofbidirectional texture functions on arbitrary surfaces.”, ACMTransactions on Graphics 21, 3 (July 2002), 665-672. (Proceedings of ACMSIGGRAPH 2002), incorporated herein by reference. According to thestandard k-coherence criteria, C(v,ε) should be populated with pixelsthat are appropriately “forward-shifted” with respect to pixels alreadyused for synthesis. In addition to each “forward-shifted” pixel, its(k−1) nearest neighbors by the neighborhood distance should also beincluded in C(v,ε). The algorithm builds C(v,ε) using the k-coherencetechnique with an additional check for the condition in Equation (1) foreach candidate pixel p. The k-coherence technique can be accelerated bypre-computing the k nearest neighbors for each pixel of the 2D sampletexture. For instance, k can be set to 20.

An alternative approach to handling the transition functions is to putthe transition function values in the alpha channel and compute theL2-norm of RGBA-vectors during texture synthesis. Forprogressively-variant textures, this technique has the drawback that thepixel found by the search procedure may not satisfy the condition inEquation (1).

It should be noted for synthesis of stationary textures on a mesh, it isstandard to have an orientation field on the mesh. The difference with aprogressively-variant texture is that it needs an orientation field onthe input 2D texture as well.

Although the present invention has been described with reference toparticular embodiments, workers skilled in the art will recognize thatchanges may be made in form and detail without departing from the spiritand scope of the invention.

1. A computer implemented method for rendering a synthesized image,comprising: accessing a first texton mask indicative of feature elementsin a sample texture; creating a second texton mask havingprogressively-variant features based on a user selected transitionfunction applied to the first texton mask; and creating a synthesizedtexture image guided by the first texton mask, the second texton maskand the sample texture.
 2. The method of claim 1 wherein creating thesecond texton mask comprises creating the second texton mask withrepresentative values indicating a plurality of colors.
 3. The method ofclaim 1 wherein creating the second texton mask comprises creating thesecond texton mask with binary representative values indicating aplurality of colors.
 4. The method of claim 1 wherein creating thesecond texton mask comprises creating the second texton mask with atransition function including mesh warping.
 5. The method of claim 1wherein creating the second texton mask comprises creating the secondtexton mask with a transition function including field warping.
 6. Themethod of claim 1 wherein creating the second texton mask comprisescreating the second texton mask with a transition function using radialbasis functions.
 7. The method of claim 1 wherein creating thesynthesized texture includes identifying a portion of the synthezisedtexture to synthesize and identifying a corresponding portion of thesecond texton mask for the portion to be synthesized.
 8. The method ofclaim 7 wherein creating the synthesized texture includes identifying aportion of the first texton mask similar to the portion of the secondtexton mask and identifying a corresponding portion of the sampletexture corresponding to the portion of the first texton mask.
 9. Themethod of claim 8 wherein creating the synthesized texture includesassigning pixel characteristics of the portion of the synthesizedtexture according to the portion of the sample texture.
 10. A computerimplemented method for rendering a synthesized image, comprising:accessing a first texton mask and a second texton mask, each texton maskbeing indicative of feature elements in respective first and secondsample textures; creating a third texton mask being based on acombination of the first texton mask and the second texton mask; andcreating a synthesized texture image guided by the first texton mask,the second texton mask, the first sample texture and the second sampletexture.
 11. The method of claim 10 wherein creating the third textonmask comprises interpolating between the first texton mask and thesecond texton mask.
 12. The method of claim 11 wherein interpolatingbetween the first texton mask and the second texton mask comprisesinterpolating two dimensional functions of the first texton mask and thesecond texton mask in three dimensions and obtaining a two dimensionalportion.
 13. The method of claim 11 wherein creating the third textonmask comprises smoothing the third texton mask after interpolating. 14.The method of claim 13 wherein smoothing comprises using a Gaussianfunction.
 15. The method of claim 13 wherein creating the third textonmask comprises setting values of the third texton mask as a function ofa threshold.
 16. The method of claim 10 wherein creating the synthesizedtexture comprises: creating a first modified texture guided by the firsttexton mask, the third texton mask and the first sample texture;creating a second modified texture guided by the second texton mask, thethird texton mask and the second sample texture; combining the firstmodified texture and the second modified texture.
 17. The method ofclaim 16 wherein combining the first modified texture and the secondmodified texture includes using a selected transition function.
 18. Themethod of claim 16 wherein creating the first modified texture includesidentifying a portion of the first modified texture to synthesize andidentifying a corresponding portion of the third texton mask for theportion to be synthesized, and wherein creating the second modifiedtexture includes identifying a portion of the second modified texture tosynthesize and identifying a corresponding portion of the third textonmask for the portion to be synthesized.
 19. The method of claim 18wherein creating the first modified texture includes identifying aportion of the first texton mask similar to the portion of the thirdtexton mask and identifying a corresponding portion of the first sampletexture corresponding to the portion of the first texton mask, andwherein creating the second modified texture includes identifying aportion of the second texton mask similar to the portion of the thirdtexton mask and identifying a corresponding portion of the second sampletexture corresponding to the portion of the second texton mask.
 20. Themethod of claim 19 wherein creating the first modified texture includesassigning pixel characteristics of the portion of the first modifiedtexture according to the portion of the first sample texture, andwherein creating the second modified texture includes assigning pixelcharacteristics of the portion of the second modified texture accordingto the portion of the second sample texture.
 21. A computer implementedmethod for rendering a synthesized texture on an image of athree-dimensional object, comprising: accessing a two-dimensionalprogressively-variant sample texture, a texton mask for the sampletexture and a representation of the three-dimensional object comprisinga mesh of a plurality of vertices; and creating a synthesized texture onthe object guided by the two-dimensional progressively-variant sampletexture, the texton mask for the sample texture and the mesh of aplurality of vertices.
 22. The method of claim 21 wherein creating thesynthesized texture comprises synthesizing a texton mask on the meshalong with a target texture.
 23. The method of claim 22 whereinsynthesizing a texton mask on the mesh along with a target texturecomprises determining a texton mask value and determining a color valueat each vertex.
 24. The method of claim 23 wherein determining a textonmask value and determining a color value includes determining acandidate pool of pixels to select from.
 25. The method of claim 24wherein determining the texton mask value includes forming a firstneighborhood of mask values of vertices about each vertex and a secondneighborhood of mask values about each pixel in the candidate pool ofpixels.
 26. The method of claim 25 wherein determining the texton maskvalue at each vertex includes selecting the mask value for the candidatepixel having the smallest distance between the first neighborhood ofmask values of the vertex and the second neighborhood of mask valuesabout each pixel in the candidate pool of pixels.
 27. The method ofclaim 26 wherein determining the color value includes forming a firstneighborhood of color values of vertices about each vertex and a secondneighborhood of color values about each pixel in the candidate pool ofpixels.
 28. The method of claim 27 wherein determining the color valueat each vertex includes selecting the color value for the candidatepixel having the smallest of the sum of the distance between the firstneighborhood of mask values of the vertex and the second neighborhood ofmask values about each pixel in the candidate pool of pixels and thedistance between the first neighborhood of color values of the vertexand the second neighborhood of color values about each pixel in thecandidate pool of pixels.
 29. The method of claim 28 wherein a number ofpixels forming the neighborhoods of mask values is greater than a numberof pixels forming neighborhoods of color values.